<!DOCTYPE html>
<html lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<!-- <meta name="viewport" content="target-densitydpi=device-dpi,width=750,user-scalable=no" /> -->
	<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no" />
	<title>心灵影院</title>
	<meta http-equiv="cleartype" content="on">
    <meta name="apple-mobile-web-app-title" content="...">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    <meta http-equiv="x-rim-auto-match" content="none">
    <meta name="apple-touch-fullscreen" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
	<!-- windows phone 点击无高光 -->
	<meta name="msapplication-tap-highlight" content="no">
	<link rel="stylesheet" type="text/css" href="/css/base.css" />
	<link rel="stylesheet" type="text/css" href="/js/mobile/lib/idangerous.swiper.css" />
	<script type="text/javascript" src="/js/mobile/lib/jquery-1.10.1.min.js"></script>
	<link href="http://vjs.zencdn.net/6.2.4/video-js.css" rel="stylesheet">

	<!-- If you'd like to support IE8 -->
	<script src="http://vjs.zencdn.net/ie8/1.1.2/videojs-ie8.min.js"></script>

	<script src="http://vjs.zencdn.net/6.2.4/video.js"></script>

	<link href="http://vjs.zencdn.net/c/video-js.css" rel="stylesheet">
	<script src="http://vjs.zencdn.net/c/video.js"></script>
</head>
<body>
	<div class="main">
		<!-- 播放影片的区域 -->
		<div class="video">
			<!-- 返回 上一层按钮 -->
			<div class="icon v-back" onclick="window.history.back(-1)"></div>
			<!-- 底部操作按钮 -->
			<div class="video-ops">
				<i class="vp-timer">00:00:00</i>
				<span class="vp-progress">
					<div class="pg-bg">
						<span class="pg-ranks"></span>
					</div>
					<div class="pg-tag"></div>
				</span>
				<span class="vp-ctimer">
					<i class="ctimer-l">00:00:00</i> /
					<i class="ctimer">00:00:00</i>
				</span>
				<!-- <span class="vp-screen"></span> -->
			</div>
			<!-- 视屏视频中间点击图标 -->
			<!-- <div class="v-btn"></div> -->
			<!-- 视频播放 -->
			<video preload="auto" width="100%" height="100%" class="my-video" >
				<source src="${videoVoucher}" type="video/mp4"></video>
				sorry
			</video>
			<!-- 视屏蒙层 -->
			<div class="video-m">视频加载中.....请稍后</div>
		</div>
		<!--<div class="video">-->
			<!--<video id="my_video_1" class="video-js vjs-default-skin vjs-vjs-16-9" controls-->
				   <!--autoplay="true"-->
				   <!--preload="auto" poster="${film.fPhotow}" >-->
				<!--<source src="${videoVoucher}" type="video/mp4">-->
			<!--</video>-->
		<!--</div>-->
		<!-- 展示影片信息的区域 -->
		<div class="video-info">
			<!-- 基本信息 -->
			<div class="base-info">
				<div class="v-name">${film.fName}</div>
				<div class="v-tag">	
					<span class="score-box"><i class="v-score">${film.fScore?string('0.0')}</i>分
					</span>
					<i class="v-year">${film.fYear?c}</i>
					<i class="v-place">${film.fCountryname}</i>
					<i class="v-type">${film.fFilmtypename}</i>
				</div>
				<div class="v-introduce">
					<i class="vi-title">影片详情：</i>
					${filminfo.fIntroduce}
				</div>
				<!-- 展示 v-introduce 的图标-->
				<div class="icon show-vi"></div>
			</div>
			<!-- 附加信息 -->
			<div class="add-info">
				<span class="paly-count"><i class="play-nums">${film.fPlayct?c}</i>次播放</span>
				<span class="people-area">
					<span class="icon p-ops p-comment"></span>
					<span class="icon p-ops p-share" style="display:none"></span>
					<span class="icon p-ops p-follow" onclick="AddCollect('${film.fId}')"></span>
				</span>
			</div>
		</div>
		<!-- 展示剧集 -->
		<div class="moves mmove">
			<div class="m-title">
				<i class="m-type">剧集</i>
				<!--<i class="all-drama">全部剧集</i>-->
			</div>
			<!-- 加载剧集列表的容器 -->
			<div class="drama-box">
				<div class="swiper-container swiper-drama">
					<div class="swiper-wrapper">
						<div class="swiper-slide drama-slide">
							<span class="drama-list"><img src="${film.fPhotow}"></span>
							<!--<span class="drama-list"></span>-->
							<!--<span class="drama-list"></span>-->
							<!--<span class="drama-list"></span>-->
						</div>
					</div>
				</div>
			</div>
		</div>
		<!-- 猜你喜欢 hobby -->
		<div class="moves mmove">
			<div class="m-title">
				<i class="m-type">猜你喜欢</i>
				<!-- <i class="all-drama">全部剧集</i> -->
			</div>
			<!-- 加载猜你喜欢的容器 -->
			<div class="drama-box">
				<div class="swiper-container swiper-hobby">
					<div class="swiper-wrapper">
						<div class="swiper-slide hobby-slide" id="category-head">
							<span class="hobby-list">
								<div class="hobby-img"></div>
								<div class="hobby-ind">
									<div class="ind-name">矿区危情</div>
									<div class="ind-type">矿区危情</div>
								</div>
							</span>
							<span class="hobby-list">
								<div class="hobby-img"></div>
								<div class="hobby-ind">
									<div class="ind-name">矿区危情</div>
									<div class="ind-type">矿区危情</div>
								</div>
							</span>
							<span class="hobby-list">
								<div class="hobby-img"></div>
								<div class="hobby-ind">
									<div class="ind-name">矿区危情</div>
									<div class="ind-type">矿区危情</div>
								</div>
							</span>
							<span class="hobby-list">
								<div class="hobby-img"></div>
								<div class="hobby-ind">
									<div class="ind-name">矿区危情</div>
									<div class="ind-type">矿区危情</div>
								</div>
							</span>
						</div>
					</div>
				</div>
			</div>
		</div>
		<!-- 评论区 -->
		<div class="moves mmove">
			<div class="m-title">
				<i class="m-type">评论</i>
				<i class="m-more">更多></i>
			</div>
			<!-- 评论区列表的容器 --><!-- 点击评论按钮之后 出现的评论列表 和输入框  加个 classname = "comment-fix" -->
			<div class="comment-box">
				<!-- comment-fixed title -->
				<div class="fixed-title">
					评论
					<i class="close-fixed-comment">×</i>
				</div>
				<div class="comment-c" id="ul_comment">

				</div>

				<div class="fixed-input">
					<span class="fi-v">写评论</span>
					<span class="fi-btn" onclick="AddConment();">发送</span>
				</div>
			</div>
		</div>
		<!-- 页面的蒙层 -->
		<!-- <div class="page-m"></div> -->
		<!-- 评论弹窗 -->
		<div class="page-layer m-comment">
			<div class="value-box">
				<textarea class="cm-value" placeholder="输入评论"
						  id="commentText"
						  onkeydown="textCounter(this)">

				</textarea>
			</div>
			<div class="cm-ops">
				<span class="words-count">
					<i class="has-words" id="has-words">0</i>/200
				</span>
				<span class="submit-btn" onclick="AddConment();">发送</span>
			</div>
		</div>
	</div>
	<script type="text/javascript" src="/js/mobile/lib/idangerous.swiper.min.js"></script>
	<script type='text/javascript' src='/js/mobile/mobilecom.js' charset='utf-8'></script>
	<script type="text/javascript" src="/js/mobile/tools.js"></script>
	<script type="text/javascript" src="/js/jquery/jquery.cookie.js"></script>
	<script type="text/javascript" src="/js/mobile/myvideo.js"></script>
	<script>



        function LoadGussYourLike() {
            var filtype='${film.fFilmtype?string}';
            $.ajax({
                type: 'get',
                url: '/api/film/guessfilmlist?filmtype='+filtype+'&count=4',
                dataType: 'json',
                success: function(data){
                    if(mortise_layout.ValidataResult(data)){
                        //{"code":"OperateOk","errorMsg":"","result":{"list":[{"fId":"594cabc05bc42d07a0aa541a","fName":"一个钓鱼的故事","fFilmtype":"1000010100000000000","fYear":2016,"fCountry":12,"fKeyword":"一个钓鱼的故事","fPhoto":"http://119.10.70.142:9080/Images/upload/videoPhoto/595a87fe37ca1d108069af15.png","fPhotow":"http://101.201.122.79:8083/Images/upload/videoPhoto/596adca774c36b070e69ec8e.jpg","fDirector":"Matt Birman","fPerformer":"Eddie McClintock, Jayne Heitmeyer, Jordyn Negri ","fShowtime":"2016-12-12","fScore":0.0,"fPricetagid":"0","fPricetagname":"免费电影","fIntime":"2017-06-23 14:20:23","fShow":1,"fLookct":0,"fMakelookct":11,"fGoodct":0,"fMakegoodct":12,"fCollect":2,"fMakecollect":13,"fPlayct":132,"fMakepalyct":15,"fSharect":0,"fMakesharect":null,"fBuyct":0,"fCommentct":22,"fSourceurl":null,"fCountryname":"加拿大","fFilmtypename":"喜剧/剧情/奇幻","fImpression":"印象"},{"fId":"5930e4cd1c886e2dc0d45342","fName":"末世迷踪：下一代","fFilmtype":"0000000100000000000","fYear":2016,"fCountry":4,"fKeyword":"末世迷踪：下一代","fPhoto":"http://119.10.70.142:9080/Images/upload/videoPhoto/595a88f137ca1d108069af17.png","fPhotow":"http://101.201.122.79:8083/Images/upload/videoPhoto/596adcc774c36b070e69ec90.jpg","fDirector":"Larry A. McLean","fPerformer":" Amber Frank, Mason Dye, Dylan Sprayberry","fShowtime":"2017-06-02","fScore":0.0,"fPricetagid":"0","fPricetagname":"免费电影","fIntime":"2017-06-02 12:08:34","fShow":1,"fLookct":1,"fMakelookct":15,"fGoodct":2,"fMakegoodct":25,"fCollect":2,"fMakecollect":0,"fPlayct":17,"fMakepalyct":5,"fSharect":1,"fMakesharect":null,"fBuyct":0,"fCommentct":4,"fSourceurl":null,"fCountryname":"美国","fFilmtypename":"奇幻","fImpression":null},{"fId":"594c95065bc42d07a03f1fac","fName":"大婴儿","fFilmtype":"1100010000000000000","fYear":2015,"fCountry":4,"fKeyword":"大婴儿","fPhoto":"http://119.10.70.142:9080/Images/upload/videoPhoto/595a887337ca1d108069af16.png","fPhotow":"http://101.201.122.79:8083/Images/upload/videoPhoto/596adcb874c36b070e69ec8f.jpg","fDirector":"Stephen Langford","fPerformer":"Maureen McCormick, Andrew Lawrence, Ken Davitian","fShowtime":"2015-12-12","fScore":0.0,"fPricetagid":"1","fPricetagname":"2元电影","fIntime":"2017-06-23 12:43:35","fShow":1,"fLookct":0,"fMakelookct":11,"fGoodct":0,"fMakegoodct":12,"fCollect":1,"fMakecollect":13,"fPlayct":11,"fMakepalyct":15,"fSharect":0,"fMakesharect":null,"fBuyct":0,"fCommentct":4,"fSourceurl":null,"fCountryname":"美国","fFilmtypename":"喜剧/爱情/剧情","fImpression":"印象"},{"fId":"594cacc75bc42d07a0aa541b","fName":"正义","fFilmtype":"1100000000000000000","fYear":2016,"fCountry":4,"fKeyword":"正义","fPhoto":"http://119.10.70.142:9080/Images/upload/videoPhoto/595a87a137ca1d108069af14.png","fPhotow":"http://101.201.122.79:8083/Images/upload/videoPhoto/596adc9d74c36b070e69ec8d.jpg","fDirector":"Richard Gabai","fPerformer":" Stephen Lang, Jackson Rathbone, Jamie-Lynn Sigler ","fShowtime":"2016-12-12","fScore":0.0,"fPricetagid":"0","fPricetagname":"免费电影","fIntime":"2017-06-23 14:24:45","fShow":1,"fLookct":0,"fMakelookct":11,"fGoodct":0,"fMakegoodct":12,"fCollect":0,"fMakecollect":13,"fPlayct":4,"fMakepalyct":15,"fSharect":0,"fMakesharect":null,"fBuyct":0,"fCommentct":0,"fSourceurl":null,"fCountryname":"美国","fFilmtypename":"喜剧/爱情","fImpression":"印象"}]},"allcount":0}
                        var videoList=data.result;
                        if(videoList&& videoList.length>0){
                            var _html='';
                            $.each(videoList,function (index,item) {
                                _html+='<span class="hobby-list" onclick="GoToVideoInfo(\''+item.fId+'\')">'+
                                '<div class="hobby-img"> <img src="'+item.fPhotow+'"alt=""/></div>'+
                                '   <div class="hobby-ind">'+
                                '   <div class="ind-name">'+item.fName+'</div>'+
                                '   <div class="ind-type">'+item.fFilmtypename+'</div>'+
                                '   </div>'+
                                '   </span>';

                            });
                            $('#category-head').html(_html);
                        }

                    }
                }
            });
        }


        var filmObject = {
            pno: 1,
            pagesize: 5,
            allcount: -1
        }
        LoadGussYourLike();
        LoadComment();
        function LoadComment() {
            $('#div_commentfoot').html('');

            $('#commnt_foot').remove();
            var filmId = '${film.fId?string}';
            $.ajax({
                type: 'get',
                url: '/api/comment/getcommentlist?classtype=1&objectid=' + filmId +
                '&parentid=0&pno=' + filmObject.pno + '&pagesize=' + filmObject.pagesize + '&allcount=' + filmObject.allcount,
                dataType: 'json',
                success: function (data) {
                    if (mortise_layout.ValidataResult(data)) {
                        //{"code":"OperateOk","errorMsg":"","result":{"list":[{"fId":"594cabc05bc42d07a0aa541a","fName":"一个钓鱼的故事","fFilmtype":"1000010100000000000","fYear":2016,"fCountry":12,"fKeyword":"一个钓鱼的故事","fPhoto":"http://119.10.70.142:9080/Images/upload/videoPhoto/595a87fe37ca1d108069af15.png","fPhotow":"http://101.201.122.79:8083/Images/upload/videoPhoto/596adca774c36b070e69ec8e.jpg","fDirector":"Matt Birman","fPerformer":"Eddie McClintock, Jayne Heitmeyer, Jordyn Negri ","fShowtime":"2016-12-12","fScore":0.0,"fPricetagid":"0","fPricetagname":"免费电影","fIntime":"2017-06-23 14:20:23","fShow":1,"fLookct":0,"fMakelookct":11,"fGoodct":0,"fMakegoodct":12,"fCollect":2,"fMakecollect":13,"fPlayct":132,"fMakepalyct":15,"fSharect":0,"fMakesharect":null,"fBuyct":0,"fCommentct":22,"fSourceurl":null,"fCountryname":"加拿大","fFilmtypename":"喜剧/剧情/奇幻","fImpression":"印象"},{"fId":"5930e4cd1c886e2dc0d45342","fName":"末世迷踪：下一代","fFilmtype":"0000000100000000000","fYear":2016,"fCountry":4,"fKeyword":"末世迷踪：下一代","fPhoto":"http://119.10.70.142:9080/Images/upload/videoPhoto/595a88f137ca1d108069af17.png","fPhotow":"http://101.201.122.79:8083/Images/upload/videoPhoto/596adcc774c36b070e69ec90.jpg","fDirector":"Larry A. McLean","fPerformer":" Amber Frank, Mason Dye, Dylan Sprayberry","fShowtime":"2017-06-02","fScore":0.0,"fPricetagid":"0","fPricetagname":"免费电影","fIntime":"2017-06-02 12:08:34","fShow":1,"fLookct":1,"fMakelookct":15,"fGoodct":2,"fMakegoodct":25,"fCollect":2,"fMakecollect":0,"fPlayct":17,"fMakepalyct":5,"fSharect":1,"fMakesharect":null,"fBuyct":0,"fCommentct":4,"fSourceurl":null,"fCountryname":"美国","fFilmtypename":"奇幻","fImpression":null},{"fId":"594c95065bc42d07a03f1fac","fName":"大婴儿","fFilmtype":"1100010000000000000","fYear":2015,"fCountry":4,"fKeyword":"大婴儿","fPhoto":"http://119.10.70.142:9080/Images/upload/videoPhoto/595a887337ca1d108069af16.png","fPhotow":"http://101.201.122.79:8083/Images/upload/videoPhoto/596adcb874c36b070e69ec8f.jpg","fDirector":"Stephen Langford","fPerformer":"Maureen McCormick, Andrew Lawrence, Ken Davitian","fShowtime":"2015-12-12","fScore":0.0,"fPricetagid":"1","fPricetagname":"2元电影","fIntime":"2017-06-23 12:43:35","fShow":1,"fLookct":0,"fMakelookct":11,"fGoodct":0,"fMakegoodct":12,"fCollect":1,"fMakecollect":13,"fPlayct":11,"fMakepalyct":15,"fSharect":0,"fMakesharect":null,"fBuyct":0,"fCommentct":4,"fSourceurl":null,"fCountryname":"美国","fFilmtypename":"喜剧/爱情/剧情","fImpression":"印象"},{"fId":"594cacc75bc42d07a0aa541b","fName":"正义","fFilmtype":"1100000000000000000","fYear":2016,"fCountry":4,"fKeyword":"正义","fPhoto":"http://119.10.70.142:9080/Images/upload/videoPhoto/595a87a137ca1d108069af14.png","fPhotow":"http://101.201.122.79:8083/Images/upload/videoPhoto/596adc9d74c36b070e69ec8d.jpg","fDirector":"Richard Gabai","fPerformer":" Stephen Lang, Jackson Rathbone, Jamie-Lynn Sigler ","fShowtime":"2016-12-12","fScore":0.0,"fPricetagid":"0","fPricetagname":"免费电影","fIntime":"2017-06-23 14:24:45","fShow":1,"fLookct":0,"fMakelookct":11,"fGoodct":0,"fMakegoodct":12,"fCollect":0,"fMakecollect":13,"fPlayct":4,"fMakepalyct":15,"fSharect":0,"fMakesharect":null,"fBuyct":0,"fCommentct":0,"fSourceurl":null,"fCountryname":"美国","fFilmtypename":"喜剧/爱情","fImpression":"印象"}]},"allcount":0}
                        var videoList = data.result.list;
                        var dataCount=data.result.count;
                        $('#sp_commentct').html(dataCount);
                        if (videoList && videoList.length > 0) {

                            var _html = '';
                            $.each(videoList, function (index, item) {
                                _html+='<div class="comment-list">' +
                                '<div class="comment-title">' +
                                '<span class="c-name">'+ item.fCommentnick +'</span>' +
                                '<span class="c-timer">' + item.fIntime + '</span>' +
                                '</div>' +
                                '<div class="comment-text">' + item.fContent +
                                '</div>' +
                                '</div>';
                            });



                            if (dataCount>( filmObject.pno)* filmObject.pagesize){
                                _html+='<div class="comment-list" id="commnt_foot"><span class="get-more-data"  ' +
									'style="cursor:pointer" onclick="loadMore()">点击加载更多...</span></div>';
                            }
                            else{
                                //over
                                _html+='<div class="comment-list" id="commnt_foot"><span class="get-more-data" >没有数据了...</span></div>';
                            }
                            if(filmObject.pno==1){
                                $('#ul_comment').html(_html);
                            }
                            else{
                                $('#ul_comment').append(_html);
                            }
                        }
                        else{
                            $('#ul_comment').html('没有评论快来添加吧！');
                        }

                    }
                }
            });
        }

        function loadMore() {
            filmObject.pno++;
            LoadComment();
        }

        function AddCollect(objid){
            $.ajax({
                type: 'post',
                url: '/api/videocount/addcollectlog?classtype=1&objectid='+objid+'&apptype=3',
                dataType: 'json',
                success: function(data){
                    if(mortise_layout.ValidataResult(data)){
                        //{"code":"OperateOk","errorMsg":"","result":{"list":[{"fId":"594cabc05bc42d07a0aa541a","fName":"一个钓鱼的故事","fFilmtype":"1000010100000000000","fYear":2016,"fCountry":12,"fKeyword":"一个钓鱼的故事","fPhoto":"http://119.10.70.142:9080/Images/upload/videoPhoto/595a87fe37ca1d108069af15.png","fPhotow":"http://101.201.122.79:8083/Images/upload/videoPhoto/596adca774c36b070e69ec8e.jpg","fDirector":"Matt Birman","fPerformer":"Eddie McClintock, Jayne Heitmeyer, Jordyn Negri ","fShowtime":"2016-12-12","fScore":0.0,"fPricetagid":"0","fPricetagname":"免费电影","fIntime":"2017-06-23 14:20:23","fShow":1,"fLookct":0,"fMakelookct":11,"fGoodct":0,"fMakegoodct":12,"fCollect":2,"fMakecollect":13,"fPlayct":132,"fMakepalyct":15,"fSharect":0,"fMakesharect":null,"fBuyct":0,"fCommentct":22,"fSourceurl":null,"fCountryname":"加拿大","fFilmtypename":"喜剧/剧情/奇幻","fImpression":"印象"},{"fId":"5930e4cd1c886e2dc0d45342","fName":"末世迷踪：下一代","fFilmtype":"0000000100000000000","fYear":2016,"fCountry":4,"fKeyword":"末世迷踪：下一代","fPhoto":"http://119.10.70.142:9080/Images/upload/videoPhoto/595a88f137ca1d108069af17.png","fPhotow":"http://101.201.122.79:8083/Images/upload/videoPhoto/596adcc774c36b070e69ec90.jpg","fDirector":"Larry A. McLean","fPerformer":" Amber Frank, Mason Dye, Dylan Sprayberry","fShowtime":"2017-06-02","fScore":0.0,"fPricetagid":"0","fPricetagname":"免费电影","fIntime":"2017-06-02 12:08:34","fShow":1,"fLookct":1,"fMakelookct":15,"fGoodct":2,"fMakegoodct":25,"fCollect":2,"fMakecollect":0,"fPlayct":17,"fMakepalyct":5,"fSharect":1,"fMakesharect":null,"fBuyct":0,"fCommentct":4,"fSourceurl":null,"fCountryname":"美国","fFilmtypename":"奇幻","fImpression":null},{"fId":"594c95065bc42d07a03f1fac","fName":"大婴儿","fFilmtype":"1100010000000000000","fYear":2015,"fCountry":4,"fKeyword":"大婴儿","fPhoto":"http://119.10.70.142:9080/Images/upload/videoPhoto/595a887337ca1d108069af16.png","fPhotow":"http://101.201.122.79:8083/Images/upload/videoPhoto/596adcb874c36b070e69ec8f.jpg","fDirector":"Stephen Langford","fPerformer":"Maureen McCormick, Andrew Lawrence, Ken Davitian","fShowtime":"2015-12-12","fScore":0.0,"fPricetagid":"1","fPricetagname":"2元电影","fIntime":"2017-06-23 12:43:35","fShow":1,"fLookct":0,"fMakelookct":11,"fGoodct":0,"fMakegoodct":12,"fCollect":1,"fMakecollect":13,"fPlayct":11,"fMakepalyct":15,"fSharect":0,"fMakesharect":null,"fBuyct":0,"fCommentct":4,"fSourceurl":null,"fCountryname":"美国","fFilmtypename":"喜剧/爱情/剧情","fImpression":"印象"},{"fId":"594cacc75bc42d07a0aa541b","fName":"正义","fFilmtype":"1100000000000000000","fYear":2016,"fCountry":4,"fKeyword":"正义","fPhoto":"http://119.10.70.142:9080/Images/upload/videoPhoto/595a87a137ca1d108069af14.png","fPhotow":"http://101.201.122.79:8083/Images/upload/videoPhoto/596adc9d74c36b070e69ec8d.jpg","fDirector":"Richard Gabai","fPerformer":" Stephen Lang, Jackson Rathbone, Jamie-Lynn Sigler ","fShowtime":"2016-12-12","fScore":0.0,"fPricetagid":"0","fPricetagname":"免费电影","fIntime":"2017-06-23 14:24:45","fShow":1,"fLookct":0,"fMakelookct":11,"fGoodct":0,"fMakegoodct":12,"fCollect":0,"fMakecollect":13,"fPlayct":4,"fMakepalyct":15,"fSharect":0,"fMakesharect":null,"fBuyct":0,"fCommentct":0,"fSourceurl":null,"fCountryname":"美国","fFilmtypename":"喜剧/爱情","fImpression":"印象"}]},"allcount":0}
						if (data.code=='OperateOk'){
						    alert('收藏成功！');
                            filmObject.pno=1;
                            LoadComment();
						}
						else if (data.code=='OperateFail'){
						    alert('收藏失败！')
						}
						else if(data.code=='FiledRepeat'){
							alert('您已经添加收藏！')
						}

                    }
                }
            });
		}


        function textCounter(field) {
            var maxlimit=200;
            if (field.value.length > maxlimit)
                field.value = field.value.substring(0, maxlimit);
            else
                $('#has-words').html( field.value.length)  ;
        }

        //登录
        function UserLogin(func){
            var phone=$('#input_phone').val();
            var pwd=$('#input_pwd').val();
            if (!phone){
                alert('请输入手机号码！');
                return false;
            }
            if (!pwd){
                alert('请输入密码！');
                return false;
            }
            $.ajax({
                type: 'POST',
                url: 'api/user/loginuser',
                data: { phone: phone,password:pwd,loginapp:6},
                dataType: 'json',
                success: function(data){
                    if (data.code=='LoginSucess') {
                        alert('登录成功！');
                        $(".login-reg").remove();
                        $(".page-m").hide();
                        if (typeof (func)=='function'){
                            func();
                        }
                    }
                    else if (data.code=='NoLogin'||data.code=='LoginFail'){
                        alert("帐号和密码有误，登录失败")
                    }
                    else if (data.code=='LoginPassError'){
                        alert('帐号和密码有误，登录失败！');
                    }

                }
            });
        }


        function AddConment() {
            var filmId='${film.fId}';
            var conment=$('#commentText').val();
            if (!filmId){
                alert('数据错误,视频id不存在！');
                return;
            }
            if (!commentText){
                alert('请输入评论内容！');
                return;
            }
            $.ajax({
                type: 'POST',
                url: '/api/comment/addcomment?classtype=1&objectid='+filmId+'&' +
                'parentid=0&content='+conment+'&tocommentid=0',
                dataType: 'json',
                success: function(data){
                    if (mortise_layout.ValidataResult(data)) {
                        if (data.code=='OperateOk'){
							$('.m-comment').hide();
                            $(".page-m").hide();


                            filmObject.pno=1;
                            LoadComment();
                            $(".close-fixed-comment").click();
                        }
                        else{
                            alert('操作失败！');
                        }

                    }
                },
                error: function(xhr, type){
                    alert('Ajax error!')
                }
            });
        }
	</script>
</body>
</html>